package com.practice.tetris.ui.layers;

import com.practice.tetris.ui.Layer;

import javax.swing.*;
import java.awt.*;
import java.net.URL;

/**
 * Author: Zhouyue
 * Date: 2015/6/9 19:40
 */
public class LayerRankAll extends Layer {
    /**
     *图片素材存储路径
     */
    private static URL IMG_URL = Layer.class.getResource("/string/rankAll.png");
    /**
     * 图片素材
     */
    private static final Image IMG_RANK_ALL = new ImageIcon(IMG_URL).getImage();

    public LayerRankAll(int x, int y, int width, int height) {
        super(x, y, width, height);
    }

    public void paint(Graphics g) {
        this.createLayer(g);
        g.drawImage(IMG_RANK_ALL, this.x + PADDING, this.y + PADDING, null);
    }
}
